home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 …ember: Reference Library / Dev.CD Dec 97 RL.toast / What's New / Tool Chest / Testing & Debugging / Virtual User / Examples / External Tool Templates / CPlus Tool Template / Application.r < prev    next >
Encoding:
Text File  |  1997-10-15  |  10.1 KB  |  307 lines  |  [TEXT/MPS ]

  1. /*
  2.  *    File:        Application.r
  3.  *
  4.  *    Contains:    xxx put contents here xxx
  5.  *
  6.  *    Written by:    Rick Violet
  7.  *
  8.  *    Copyright:    © 1992 by Apple Computer, Inc., all rights reserved.
  9.  *
  10.  *    Change History (most recent first):
  11.  *
  12.  *        <2+>      9/7/93    RV        change to 1.0.1b2
  13.  *        <1+>     8/26/93    RV        
  14.  *                11/18/92    RV        xxx put comment here xxx
  15.  *
  16.  *    To Do:
  17.  */
  18.  
  19. #include "SysTypes.r"
  20. #include "Types.r"
  21.  
  22. #include "Application.R.h"
  23.  
  24. /*——————————————————————————————————————————————————————————————————————————————————*/
  25. /*    Version Resource                                                                */
  26. /*——————————————————————————————————————————————————————————————————————————————————*/
  27. resource 'vers' (1) 
  28. {
  29.     0x02, 0x02, development, 0x01,
  30.     verUS,
  31.     "1.0d1",
  32.     "1.0d1, Copyright © 1994 Apple Computer, Inc."
  33. };
  34.  
  35. /*——————————————————————————————————————————————————————————————————————————————————*/
  36. /*    MBAR    -    determines what menus are loaded                                    */            
  37. /*——————————————————————————————————————————————————————————————————————————————————*/
  38. resource 'MBAR' ( kMenuBarID, preload ) 
  39. {
  40.     { kAppleMenuID, kFileMenuID, kServicesMenuID };
  41. };
  42.  
  43.  
  44. /*——————————————————————————————————————————————————————————————————————————————————*/
  45. /*    MENU    -    apple menu                                                            */            
  46. /*——————————————————————————————————————————————————————————————————————————————————*/
  47. resource 'MENU' ( kAppleMenuID, preload ) 
  48. {
  49.     kAppleMenuID, textMenuProc,
  50.     0b1111111111111111111111111111101,    /* enable About… & DAs, disable separator */
  51.     enabled, apple,
  52.     {    
  53.         "About Switchboard…",    noIcon,     noKey,     noMark,     plain,
  54.         "-",                     noIcon,     noKey,     noMark,     plain
  55.     }
  56. };
  57.  
  58. /*——————————————————————————————————————————————————————————————————————————————————*/
  59. /*    MENU    -    file menu                                                            */            
  60. /*——————————————————————————————————————————————————————————————————————————————————*/
  61. resource 'MENU' (kFileMenuID, preload) 
  62. {
  63.     kFileMenuID, textMenuProc,
  64.     0b0000000000000000000000000000001,    /* enable Quit only, program enables others */
  65.     enabled, "File",
  66.     {
  67.         "Quit",                    noicon,        "Q",     nomark,     plain
  68.     }
  69. };
  70.  
  71. /*——————————————————————————————————————————————————————————————————————————————————*/
  72. /*    MENU    -    services menu                                                            */            
  73. /*SBR Hacked this in 05/23/94 */
  74. /*——————————————————————————————————————————————————————————————————————————————————*/
  75. resource 'MENU' (kServicesMenuID, preload) 
  76. {
  77.     kServicesMenuID, textMenuProc,
  78.     0b00000000000000000000000000000000,    /* none to enable yet */
  79.     disabled, "Services",
  80.     {
  81.         
  82.     }
  83. };
  84.  
  85. /*——————————————————————————————————————————————————————————————————————————————————*/
  86. /*    ALRT    -    About box alert                                                        */
  87. /*——————————————————————————————————————————————————————————————————————————————————*/
  88. resource 'ALRT' (kAboutAlertID, purgeable) 
  89. {
  90.     {40, 20, 160, 330 }, kAboutAlertID, 
  91.     {
  92.         OK, visible, silent;
  93.         OK, visible, silent;
  94.         OK, visible, silent;
  95.         OK, visible, silent
  96.     };
  97. };
  98.  
  99. /*——————————————————————————————————————————————————————————————————————————————————*/
  100. /*    DITL    -    About box alert    item list                                            */
  101. /*——————————————————————————————————————————————————————————————————————————————————*/
  102. resource 'DITL' ( kAboutAlertID, purgeable ) 
  103. { {                                
  104.     { 88, 184, 108, 264}, Button     { enabled,     "OK"    },
  105.     {  8,   8,  24, 245}, StaticText { disabled, "Switchboard VU External Tool"    },
  106.     { 30,   8,  62, 244}, StaticText { disabled, "Written in C++. Based on the\n" 
  107.                                                  "C++ template by Rick Violet" },
  108.     { 68,   8,  84, 244}, StaticText { disabled, "Brought to you by: SBR"    },
  109.     { 90,   8, 122, 170}, StaticText { disabled, "Copyright © 1994 \n"
  110.                                                  "Apple Computer, Inc."    }
  111. } };
  112.  
  113.  
  114. /*——————————————————————————————————————————————————————————————————————————————————*/
  115. /*    SIZE                                                                            */
  116. /*——————————————————————————————————————————————————————————————————————————————————*/
  117. resource 'SIZE' (-1) 
  118. {
  119.     reserved,
  120.     acceptSuspendResumeEvents,
  121.     reserved,
  122.     canBackground,
  123.     multiFinderAware,
  124.     backgroundAndForeground,
  125.     dontGetFrontClicks,
  126.     ignoreChildDiedEvents,
  127.     is32BitCompatible,
  128.     isHighLevelEventAware,
  129.     localAndRemoteHLEvents,
  130.     notStationeryAware,
  131.     dontUseTextEditServices,
  132.     reserved, 
  133.     reserved, 
  134.     reserved,
  135.     kPrefSize * 1024,
  136.     kMinSize * 1024
  137. };
  138.  
  139.  
  140. /*——————————————————————————————————————————————————————————————————————————————————*/
  141. /*    BNDL                                                                            */
  142. /*——————————————————————————————————————————————————————————————————————————————————*/
  143. resource 'BNDL' (128) 
  144. {
  145.     kOwnerSignature, 0,
  146.     {
  147.         'ICN#', { 0, 128 },
  148.         'FREF', { 0, 128 }
  149.     }
  150. };
  151.  
  152. /*——————————————————————————————————————————————————————————————————————————————————*/
  153. /*    Creator Signature String                                                        */
  154. /*——————————————————————————————————————————————————————————————————————————————————*/
  155. type kOwnerSignature as 'STR ';
  156. resource kOwnerSignature (0) 
  157. {
  158.     "C++ External Tool Application for use with Virtual User."
  159. };
  160.  
  161. /*——————————————————————————————————————————————————————————————————————————————————*/
  162. /*    FREF                                                                            */
  163. /*——————————————————————————————————————————————————————————————————————————————————*/
  164. resource 'FREF' (128) 
  165. {
  166.     'APPL', 0, ""
  167. };
  168.  
  169.  
  170. /*——————————————————————————————————————————————————————————————————————————————————*/
  171. /*    ICN#                                                                            */
  172. /*——————————————————————————————————————————————————————————————————————————————————*/
  173. resource 'ICN#' (128) {
  174.     { /* array: 2 elements */
  175.         /* [1] */
  176.         $"04 30 40 00 0A 50 A0 00 0B 91 10 02 08 22 08 03"
  177.         $"12 24 04 05 20 28 02 09 40 10 01 11 80 0C 00 A1"
  178.         $"80 03 FF C2 7E 00 FF 04 01 00 7F 04 03 00 1E 08"
  179.         $"04 E0 00 0C 08 E0 00 0A 10 E0 00 09 08 C0 00 06"
  180.         $"04 87 FE 04 02 88 01 04 01 88 00 84 00 88 00 44"
  181.         $"00 88 00 44 00 88 00 C4 01 10 01 88 02 28 03 10"
  182.         $"01 C4 04 E0 00 02 08 00 73 BF FB EE 4C A2 8A 2A"
  183.         $"40 AA AA EA 52 AA AA 24 5E A2 8A EA 73 BE FB 8E",
  184.         /* [2] */
  185.         $"04 30 40 00 0E 70 E0 00 0F F1 F0 02 0F E3 F8 03"
  186.         $"1F E7 FC 07 3F EF FE 0F 7F FF FF 1F FF FF FF BF"
  187.         $"FF FF FF FE 7F FF FF FC 01 FF FF FC 03 FF FF F8"
  188.         $"07 FF FF FC 0F FF FF FE 1F FF FF FF 0F FF FF FE"
  189.         $"07 FF FF FC 03 FF FF FC 01 FF FF FC 00 FF FF FC"
  190.         $"00 FF FF FC 00 FF FF FC 01 FF FF F8 03 EF FF F0"
  191.         $"01 C7 FC E0 00 03 F8 00 73 BF FB EE 7F BE FB EE"
  192.         $"7F BE FB EE 7F BE FB E4 7F BE FB EE 73 BE FB 8E"
  193.     }
  194. };
  195.  
  196. /*——————————————————————————————————————————————————————————————————————————————————*/
  197. /*    ALRT    -    Standard Error Message alert                                        */
  198. /*——————————————————————————————————————————————————————————————————————————————————*/
  199. resource 'ALRT' (kUserAlertID, purgeable) 
  200. {
  201.     {40, 20, 220, 460},
  202.     kUserAlertID,
  203.     {     
  204.         OK, visible, silent,
  205.         OK, visible, silent,
  206.         OK, visible, silent,
  207.         OK, visible, silent
  208.     }
  209. };
  210.  
  211. /*——————————————————————————————————————————————————————————————————————————————————*/
  212. /*    DITL    -    Standard Error Message alert items                                    */
  213. /*——————————————————————————————————————————————————————————————————————————————————*/
  214. resource 'DITL' (kUserAlertID, purgeable) 
  215. { {                                /* 3 Items */
  216. /* [  1] */     {   144,   342,  164,   422},    Button        { enabled,    "OK"    },
  217. /* [  2] */     {   10,    52,   130,   420},    StaticText    { disabled,    "Error:\n"
  218.                                                                         "^0"    },
  219. /* [  3] */     {   10,    10,    42,    42},    Icon        { disabled,    2    }
  220. } };
  221.  
  222.  
  223. /*——————————————————————————————————————————————————————————————————————————————————*/
  224. /*    STR#    -    Application Messages                                                */
  225. /*——————————————————————————————————————————————————————————————————————————————————*/
  226. resource 'STR#' ( kAppErrStrings, purgeable ) 
  227. {
  228.     {
  229.     "This application runs only on a Macintosh Plus or newer machine.";
  230.     "The memory partition is too small.\nUse Finder’s ‘Get Info’ to increase the size.";
  231.  
  232.         /*SBR Hacked this to match Thread Manager requirements 10/16/94 */
  233.     "This application runs only on System Software version 7.0 or newer.";
  234.  
  235.         /*SBR Hacked this in from RequestDispatcher.r and improved it 10/16/94 */
  236.     "The Apple® Event Manager is missing or too old.\n\nSystem 7.5 provides a newer version of this extension. If your system software is older than System 7.5, drag the Apple® Event Manager version 1.0.1 or newer to your System Folder, then restart.";
  237.  
  238.         /*SBR Hacked this in 10/16/94 */
  239.     "There was a problem initializing the application.";
  240.  
  241.         /*SBR Hacked this in 10/16/94 */
  242.     "The Thread Manager is missing or too old.\n\nSystem 7.5 provides a newer version of this extension. If your system software is older than System 7.5, drag the Thread Manager version 2.0.1 or newer to your System Folder, then restart.";
  243.     }
  244. };
  245.  
  246. /*——————————————————————————————————————————————————————————————————————————————————*/
  247. /*    CURS    -    Beach Ball 1                                                        */
  248. /*——————————————————————————————————————————————————————————————————————————————————*/
  249. resource 'CURS' (128, preload) 
  250. {
  251.     $"07C0 1F30 3F08 7F04 7F04 FF02 FF02 FFFE"
  252.     $"81FE 81FE 41FC 41FC 21F8 19F0 07C0",
  253.     $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE"
  254.     $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0",
  255.     {7, 7}
  256. };
  257.  
  258. /*——————————————————————————————————————————————————————————————————————————————————*/
  259. /*    CURS    -    Beach Ball 2                                                        */
  260. /*——————————————————————————————————————————————————————————————————————————————————*/
  261. resource 'CURS' (129, preload) 
  262. {
  263.     $"07C0 1FF0 3FF8 5FF4 4FE4 87C2 8382 8102"
  264.     $"8382 87C2 4FE4 5FF4 3FF8 1FF0 07C0",
  265.     $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE"
  266.     $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0",
  267.     {7, 7}
  268. };
  269.  
  270. /*——————————————————————————————————————————————————————————————————————————————————*/
  271. /*    CURS    -    Beach Ball 3                                                        */
  272. /*——————————————————————————————————————————————————————————————————————————————————*/
  273. resource 'CURS' (130, preload) 
  274. {
  275.     $"07C0 19F0 21F8 41FC 41FC 81FE 81FE FFFE"
  276.     $"FF02 FF02 7F04 7F04 3F08 1F30 07C0",
  277.     $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE"
  278.     $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0",
  279.     {7, 7}
  280. };
  281.  
  282. /*——————————————————————————————————————————————————————————————————————————————————*/
  283. /*    CURS    -    Beach Ball 3                                                        */
  284. /*——————————————————————————————————————————————————————————————————————————————————*/
  285. resource 'CURS' (131, preload) 
  286. {
  287.     $"07C0 1830 2008 701C 783C FC7E FEFE FFFE"
  288.     $"FEFE FC7E 783C 701C 2008 1830 07C0",
  289.     $"07C0 1FF0 3FF8 7FFC 7FFC FFFE FFFE FFFE"
  290.     $"FFFE FFFE 7FFC 7FFC 3FF8 1FF0 07C0",
  291.     {7, 7}
  292. };
  293.  
  294. /*——————————————————————————————————————————————————————————————————————————————————*/
  295. /*    acur    -    acur for Beach Ball                                                    */
  296. /*——————————————————————————————————————————————————————————————————————————————————*/
  297. resource 'acur' (0, preload) 
  298. {
  299.     {    
  300.         128,
  301.         129,
  302.         130,
  303.         131
  304.     }
  305. };
  306.  
  307.